package com.tbm.prode.services;

import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

import com.tbm.prode.model.Tournament;

public class SimpleProdeService implements ProdeService {
	
	public static void main(String[] args) {
		new SimpleProdeService().currentTournament();
	}
	
	@Override
	public Tournament currentTournament() {
		ClassPathResource res = new ClassPathResource("com/tbm/prode/services/beans.xml");
		XmlBeanFactory factory = new XmlBeanFactory(res);
		Tournament tournament = (Tournament) factory.getBean("tournament2010");
		System.out.println(tournament);
		return tournament;
	}

}
